1. Field of the Invention
The present invention relates to a white balance control technology for image data.
2. Description of the Related Art
There has conventionally been known a method for adjusting white balance (WB) based on a signal output from an image sensor. As an example, automatic white balance (AWB) processing is known. The automatic white balance control is for automatically detecting a portion likely to be white from a captured image data, calculating a white balance coefficient from an average value among color components of the entire screen, and then applying the calculated white balance coefficient to the entire screen.
Such automatic white balance processing has the following problems. In a scene where a plurality of different light sources is present, the calculated white balance coefficient is applied to the entire screen. It is, therefore, difficult to carry out white balance control for achieving appropriate colors for the respective light sources. For example, it may be supposed that while a main object is illuminated by a mercury lamp in a nightscape scene, a light source for a group of buildings in the background is a fluorescent lamp. In such a scene, when the white balance of the main object under the mercury lamp light source is set appropriate, a florescent lamp light source portion of the background becomes reddish. Similarly, when the white balance of the background is set appropriate, the white balance of the mercury lamp light source portion of the main object shifts from an appropriate state. Further, when white balance control is carried out to set intermediate white balance appropriately between the light sources, both light source portions are colored.
Further, in many cases, a color evaluation value of each block under the mercury lamp light source cannot be detected within a white detection range under a normal light source. Even in a single light source scene of the mercury lamp, it is difficult to acquire appropriate white balance.
Japanese Patent Application Laid-Open No. 2000-212641 discusses the following technology. That is, according to the technology discussed in Japanese Patent Application Laid-Open No. 2000-212641, when the number of blocks determined to be white within a first white detection range is smaller than a fixed number, whether photographing is under a low color temperature light source is determined. When it is determined that the photographing is under the low color temperature light source, a white detection range of the low color temperature side is widened to be set as a second white detection range. Then, when the number of blocks determined to be white within the second white detection range is equal to or larger than the fixed number, a white balance correction coefficient is calculated based on the blocks determined to be white.
However, according to the technology discussed in Japanese Patent Application Laid-Open No. 2000-212641, when it is determined that the photographing is under the low color temperature light source, the white detection range is widened, and the white balance correction coefficient is calculated based on the new blocks determined to be white. Thus, the technology cannot deal with a case where a plurality of light sources is present.